Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[W.I.P.] Ubi integration #7144

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

RasonJ
Copy link
Contributor

@RasonJ RasonJ commented May 14, 2024

Description

Integrates User Behavior Insights logging in the documentation website.

Issues Resolved

Tracks individual user interactions with the documentation website, so that we can use analytics to optimize the site utility for other users.

Events tracked:

  • all gtags are copied into ubi events index
  • search terms and results
  • item_clicked
  • page_exit
  • dwell time
  • 404 redirect

Checklist

  • [ x] By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@epugh
Copy link
Collaborator

epugh commented May 14, 2024

@RasonJ if this is a WIP, you can click the "Convert to Draft" and then remove the [W.I.P] label...

Copy link
Collaborator

@epugh epugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to give this a spin locally, and I'm going to take a stab at the whitespace formatting ;-). My eyes hurt with the combination of 2, 4 and 8 spacing.

assets/js/search.js Outdated Show resolved Hide resolved
assets/js/search.js Outdated Show resolved Hide resolved
assets/js/search.js Outdated Show resolved Hide resolved
assets/js/search.js Outdated Show resolved Hide resolved
assets/js/ubi.js Outdated Show resolved Hide resolved
assets/js/ubi.js Outdated Show resolved Hide resolved
_layouts/default.html Outdated Show resolved Hide resolved
@RasonJ
Copy link
Contributor Author

RasonJ commented May 14, 2024 via email

assets/js/ubi.js Outdated Show resolved Hide resolved
assets/js/ubi.js Outdated Show resolved Hide resolved
assets/js/ubi.js Outdated
export async function logEvent(event){
try {
//=>146.190.147.150
fetch('http://localhost:9200/ubi/docs', {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is to track WiP item.

},
body: event.toJson()
}).then(res => res.json())
.then(res => console.log(res))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment is to track WiP item.

@hdhalter hdhalter added the 3 - Tech review PR: Tech review in progress label May 14, 2024
assets/js/ubi.js Outdated Show resolved Hide resolved
@epugh epugh marked this pull request as draft May 30, 2024 19:45
@RasonJ
Copy link
Contributor Author

RasonJ commented Jun 6, 2024

Test implementation here: http://137.184.176.129:4000/docs/latest/
Dashboards for the implementation are also on that server: http://137.184.176.129:5601/app/opensearch-query-workbench#/

@hdhalter
Copy link
Contributor

hdhalter commented Jun 6, 2024

@epugh , @RasonJ - Do we still need this PR for 2.15?

@RasonJ
Copy link
Contributor Author

RasonJ commented Jun 10, 2024

@epugh , @RasonJ - Do we still need this PR for 2.15?
I'm not sure. @epugh, any contractual/financial reason why we would need this for 2.15?
This is probably the least urgent of our PR's, but the sooner there is more realistic data from the site, the sooner we could potentially improve/refactor UBI. Also, at some point I suspect OSC will stop hosting the sandbox server.

@epugh
Copy link
Collaborator

epugh commented Jun 11, 2024

This PR can stay draft... It becomes important once we have the OpenSearch cluster that powers the documentation website migrated to managed services version 2.15 or later. That isn't planned till September (IIRC), and then this becomes something mergable. In the meantime, this is a nice example of using UBI, and we will keep it up to date and deployed on the demo server.

@hdhalter hdhalter added On hold and removed 3 - Tech review PR: Tech review in progress labels Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants